<?php

namespace app\admin\validate;

use think\Validate;

class Task extends Validate
{
    protected $rule = [
        'work_name'       => ['require'],
        'pay_min'         => ['require'],
        'pay_max'         => ['require'],
        'recruit_num'     => ['require'],
        'tag'             => ['require'],
        'sex'             => ['require'],
        'age_min'         => ['require'],
        'age_max'         => ['require'],
        'work_desc'       => ['require'],
        'company_name'    => ['require'],
        'address_sheng'   => ['require'],
        'address_shi'     => ['require'],
        'address_details' => ['require']
    ];

    protected $message  =   [
        'work_name.require'       => '岗位名称不能位空',
        'pay_min.require'         => '最低薪资不能为空',
        'pay_max.require'         => '最高薪资不能为空',
        'recruit_num.require'     => '拟招募人数不能为空',
        'tag.require'             => '工种标签不能位空',
        'sex.require'             => '性别不能位空',
        'age_min.require'         => '最小年龄不能位空',
        'age_max.require'         => '最大年龄不能位空',
        'work_desc.require'       => '职位描述不能位空',
        'company_name.require'    => '公司名称不能位空',
        'address_sheng.require'   => '公司所在省份不能位空',
        'address_shi.require'     => '公司所在城市不能位空',
        'address_details.require' => '公司详细地址不能位空'
    ];
}
